package logic.common.game;

import com.jme.math.Vector3f;

import logic.SpawnLocation;

public class TDMSpawnLocation extends SpawnLocation {
	
	private int dimension;
	
	public TDMSpawnLocation(Vector3f spawnLoc, float orientationAngle, int dimension) {
		super(spawnLoc, orientationAngle);
		this.dimension = dimension;
	}
	
	@Override
	public Vector3f getRandomSpawn() {
		float x = getNextRandom();
		float y = 0f;
		float z = getNextRandom();
		return new Vector3f(x, y, z);
	}
	
	protected int getNextRandom() {
		return r.nextInt(dimension);
	}
}